﻿/*----------------------------------------------------------------
//  <copyright file="ISlaveDatabaseSelector.cs" company="MicroCloud@151504200868">
//      Copyright © 2020-2024 MicroCloud Corporation, All rights reserved.
//  </copyright>
//  <site>https://gitee.com/chenmm123/microclouds</site>
//  <last-editor>cmm</last-editor>
//  <last-date>2022-11-14 11:10</last-date>
//----------------------------------------------------------------*/

namespace MicroCloud.Entity
{
    #region "定义从数据库选择功能"
    /// <summary>
    /// 定义从数据库选择功能
    /// </summary>
    [MultipleDependency]
    public interface ISlaveDatabaseSelector
    {
        #region "属性"
        #region "获取 名称"
        /// <summary>
        /// 获取 名称
        /// </summary>
        string Name { get; }
        #endregion
        #region "获取 从数据库选择策略"
        /// <summary>
        /// 获取 从数据库选择策略
        /// </summary>
        SlaveDatabaseSelectorType SelectorType { get; }
        #endregion

        #endregion

        #region "方法"
        #region "从所有从数据库中返回一个"
        /// <summary>
        /// 从所有从数据库中返回一个
        /// </summary>
        /// <param name="slaves">所有从数据库</param>
        /// <returns></returns>
        SlaveDatabaseInfo Select(SlaveDatabaseInfo[] slaves);
        #endregion

        #endregion

    }
    #endregion

}
